<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<img src="./img/1.jpg" id="i1">
		<br />
		<button type="button" onclick="aa()">开始</button>
	</body>
	<script type="text/javascript">
		function aa(){
			var num = 2;
			var si = setInterval(function(){
				var ii = document.getElementById('i1');
				ii.src = "./img/"+num+".jpg";
				num++;
				if(num > 10){
					ii.src = "./img/1.jpg";
					clearInterval(si);
				}
			},1000)
		}
	</script>
</html>
